<%@ page import="br.com.qualityempresa.seguranca.RegraAcesso"%>
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'regraAcesso.label', default: 'RegraAcesso')}" />
<title>
	<g:message code="default.show.label" args="[entityName]" />
</title>
</head>
<body>
	<a href="#show-regraAcesso" class="skip" tabindex="-1">
		<g:message code="default.link.skip.label" default="Skip to content&hellip;" />
	</a>
	<div class="nav" role="navigation">
		<ul>
			<li>
				<a class="home" href="${createLink(uri: '/')}">
					<g:message code="default.home.label" />
				</a>
			</li>
			<li>
				<g:link class="list" action="list">
					<g:message code="default.list.label" args="[entityName]" />
				</g:link>
			</li>
			<li>
				<g:link class="create" action="create">
					<g:message code="default.add.label" args="[entityName]" />
				</g:link>
			</li>
		</ul>
	</div>
	<div id="show-regraAcesso" class="content scaffold-show" role="main">
		<h1>
			<g:message code="default.show.label" args="[entityName]" />
		</h1>
		<mensagem:renderizar mensagem="${flash}" />
		<ol class="property-list regraAcesso">

			<g:if test="${regraAcessoInstance?.regra}">
				<li class="fieldcontain">
					<span id="regra-label" class="property-label">
						<g:message code="regraAcesso.regra.label" default="Regra" />
					</span>

					<span class="property-value" aria-labelledby="regra-label">
						<g:fieldValue bean="${regraAcessoInstance}" field="regra" />
					</span>

				</li>
			</g:if>

			<g:if test="${regraAcessoInstance?.expressao}">
				<li class="fieldcontain">
					<span id="expressao-label" class="property-label">
						<g:message code="regraAcesso.expressao.label" default="Expressao" />
					</span>

					<span class="property-value" aria-labelledby="expressao-label">
						<g:fieldValue bean="${regraAcessoInstance}" field="expressao" />
					</span>

				</li>
			</g:if>

			<g:if test="${regraAcessoInstance?.perfisAcesso}">
				<li class="fieldcontain">
					<span id="perfisAcesso-label" class="property-label">
						<g:message code="regraAcesso.perfisAcesso.label" default="Perfis Acesso" />
					</span>

					<g:each in="${regraAcessoInstance.perfisAcesso}" var="p">
						<span class="property-value" aria-labelledby="perfisAcesso-label">
							<g:link controller="perfil" action="show" id="${p.id}">
								${p?.encodeAsHTML()}
							</g:link>
						</span>
					</g:each>

				</li>
			</g:if>

		</ol>
		<g:form>
			<fieldset class="buttons">
				<g:hiddenField name="id" value="${regraAcessoInstance?.id}" />
				<g:link class="edit" action="edit" id="${regraAcessoInstance?.id}">
					<g:message code="default.button.edit.label" default="Edit" />
				</g:link>
				<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}"
					onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
			</fieldset>
		</g:form>
	</div>
</body>
</html>
